package com.lp.biz.operations.model.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

import static com.lp.common.constant.CommonConstant.DATE_TIME;
import static com.lp.common.constant.CommonConstant.TIMEZONE;

/**
 * @program: backend
 * @description:
 * @author: Ke.Song
 * @since: 2024-07-16 22:03:53
 */
@Data
public class BannerAdd {

    private Integer id;

    @NotBlank(message = "首页图不能为空")
    private String imageUrl;

    @NotBlank(message = "类型不能为空")
    private String type;

    private String link;

    private Integer contentId;

    @NotNull(message = "开始时间不能为空")
    @JsonFormat(timezone = TIMEZONE, pattern = DATE_TIME)
    private LocalDateTime startAt;

    @NotNull(message = "结束时间不能为空")
    @JsonFormat(timezone = TIMEZONE, pattern = DATE_TIME)
    private LocalDateTime endAt;

    private Integer sort;
}
